<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body">
            <form class="layui-form" target="hide_form" method="post" action="">
                <div class="layui-form">
                    <table class="layui-table">
                        <tr>
                            <td class="lfTdBt">账户：</td>
                            <td class="rgTdBt">
                                <input type="text" name="account" value="{$oldData.account|default=''}" class="layui-input w210" />
                            </td>
                        </tr>
                        {notempty name="oldData"}
                        {neq name="oldData.role_id" value="1"}
                        <tr>
                            <td class="lfTdBt">账户权限：</td>
                            <td class="rgTdBt">
                                <select name="role_id" class="layui-input layui-unselect">
                                    {foreach name="role_list" item="val" key="key"}
                                    {gt name="val.role_id" value="$role_id"}
                                    <option value="{$val.role_id}" {eq name="val.role_id" value="$oldData.role_id"}selected{/eq} >{$val.role_name}</option>
                                    {/gt}
                                    {/foreach}
                                </select>
                                <span>必须选择正确的角色</span>
                            </td>
                        </tr>
                        {/neq}
                        {else/}
                        <tr>
                            <td class="lfTdBt">账户权限：</td>
                            <td class="rgTdBt">
                                <select name="role_id" class="layui-input layui-unselect">
                                    {foreach name="role_list" item="val" key="key"}
                                    {gt name="val.role_id" value="$role_id"}
                                    <option value="{$val.role_id}">{$val.role_name}</option>
                                    {/gt}
                                    {/foreach}
                                </select>
                                <span>必须选择正确的角色</span>
                            </td>
                        </tr>
                        {/notempty}
                        <tr>
                            <td class="lfTdBt">昵称：</td>
                            <td class="rgTdBt">
                                <input type="text" name="nickname" value="{$oldData.nickname|default=''}" class="layui-input w210" />
                            </td>
                        </tr>
                        <tr>
                            <td class="lfTdBt">手机号：</td>
                            <td class="rgTdBt">
                                <input type="text" name="mobile" value="{$oldData.mobile|default=''}" class="layui-input w210" />
                            </td>
                        </tr>
                        <tr>
                            <td class="lfTdBt">邮箱：</td>
                            <td class="rgTdBt">
                                <input type="text" name="email" value="{$oldData.email|default=''}" class="layui-input w210" />
                            </td>
                        </tr>
                        <tr>
                            <td class="lfTdBt">密码：</td>
                            <td class="rgTdBt">
                                <input type="text" name="password" value="" class="layui-input w210" />
                            </td>
                        </tr>
                        {notempty name="oldData"}
                        {eq name="role_id" value="2"}
                        <tr>
                            <td class="lfTdBt">可以显示区域：</td>
                            <td class="rgTdBt">
                                <div style="display: inline-flex;">
                                    <input type="hidden" id="area_id" name="area_ids" value="{$oldData.area_ids|default=''}" class="layui-input w210">
                                    <input type="text" id="area_name" value="{$oldData.area_name|default=''}" class="layui-input w210">
                                </div>
                                {eq name="oldData.role_id" value="3"}
                                <a href="javascript:;" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="load" data-url="/admin.php/area/selectareas.html" w="800" h="600">选择区域</a>
                                {else/}
                                {:u('Area/selectArea', '', '选择区域', 'load', 'layui-btn-normal layui-btn-sm', 800, 600)}
                                {/eq}
                                <span>默认全区域</span>
                            </td>
                        </tr>
                        {/eq}
                        {/notempty}
                    </table>
                    <div class="layui-form-item layui-form-text">
                        <div class="layui-input-block">
                            <input type="hidden" name="admin_id" value="{$oldData.admin_id|default=''}">
                            <input type="submit" class="layui-btn layui-btn-normal" value="立即保存" />
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>